<template>
	<view class="account-cancellation">
		<NavBar :title="pageType"/>
		<view class="content-box">
			<!-- 修改密码 -->
			<EditPWD v-if="pageType == '修改密码'"/>
			<!-- 账号注销 -->
			<Logout v-if="pageType == '账号注销'"/>
			<!-- 第三方账号绑定 -->
			<BindAccount v-if="pageType == '第三方账号绑定'"/>
			<!-- 更换手机号 -->
			<EditPhone v-if="pageType == '更换手机号'"/>
		</view>
	</view>
</template>

<script setup>
	import { ref } from 'vue';
	import { onLoad } from '@dcloudio/uni-app'
	import NavBar from '@/components/NavBar.vue';
	import EditPWD from './components/EditPWD.vue';
	import Logout from './components/Logout.vue';
	import BindAccount from './components/BindAccount.vue';
	import EditPhone from './components/EditPhone.vue';
	const pageType = ref('')
	onLoad((e) => {
		const { title } = e
		pageType.value = title
	})
</script>

<style lang="scss" scoped>
	.account-cancellation {
		.content-box {
			padding: 10px 12px;
			box-sizing: border-box;
		}
	}
</style>
